﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="WebLinkList.aspx.cs" Inherits="SBACN.WebSite.Admin.WebLink" %>

<%@ Register Src="../UC/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script>
	function DeleteSubject(id) {
		document.getElementById("<%= hid_ID.ClientID%>").value = id;
		document.getElementById("<%= btn_Delete.ClientID%>").click();
	}

	function RefreshNewsList() {
		if (document.getElementById("<%= btn_NewsRefresh.ClientID%>")) {
			document.getElementById("<%= btn_NewsRefresh.ClientID%>").click();
		}
	}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-stroke2">
		<tr>
			<td class="form-title2" width="20%">
				名称
			</td>
			<td class="form-title2" width="35%">
				地址
			</td>
			<td class="form-title2" width="20%">
				分类
			</td>
			<td class="form-title2" width="10%">
				状态
			</td>
			<td class="form-title2" width="10%">
			操作
				
			</td>
		</tr>
		<asp:Repeater ID="LinkList" runat="server">
			<ItemTemplate>
				<tr>
					<td class="form-body">
						<%# Eval("LinkName")%>
					</td>
					<td class="form-body">
						<%# Eval("LinkUrl")%>
					</td>
					<td class="form-body">
						<%# OutLinkName( Eval("Category").ToString())%>
					</td>
					<td class="form-body">
						<%# Convert.ToBoolean(Eval("Status")) ? "<font color='red'>停用</font>" : "启用"%>
					</td>
					<td class="form-body">
						<a href="<%# EditLink(Eval("Category").ToString()) %>?id=<%# Eval("ID") %>&st=<%= SystemType %>"
							target="_blank">编辑</a>&nbsp;&nbsp;
						<a id="close" href="javascript:void(0);" onclick="DeleteSubject(<%# Eval("ID") %>)">
							<%# Convert.ToBoolean(Eval("Status")) ? "启用" :"停用" %></a>
					</td>
				</tr>
			</ItemTemplate>
			<AlternatingItemTemplate>
				<tr>
					<td class="form-label">
						<%# Eval("LinkName")%>
					</td>
					<td class="form-label">
						<%# Eval("LinkUrl")%>
					</td>
					<td class="form-label">
						<%# OutLinkName( Eval("Category").ToString())%>
					</td>
					<td class="form-label">
						<%# Convert.ToBoolean(Eval("Status")) ? "<font color='red'>停用</font>" : "启用"%>
					</td>
					<td class="form-label">
						<a href="<%# EditLink(Eval("Category").ToString()) %>?id=<%# Eval("ID") %>&st=<%= SystemType %>"
							target="_blank">
							编辑</a>&nbsp;&nbsp; <a id="close" href="javascript:void(0);" onclick="DeleteSubject(<%# Eval("ID") %>)">
								<%# Convert.ToBoolean(Eval("Status")) ? "启用" :"停用" %></a>
					</td>
				</tr>
			</AlternatingItemTemplate>
		</asp:Repeater>

		<tr>
		<td colspan="5" class="form-body">
			<a target="_blank" href="WebLinkClsList.aspx?st=<%= SystemType %>">编辑分类</a>&nbsp;&nbsp;
			<a target="_blank" href="WebLinkEdit.aspx?st=<%= SystemType %>">
				新增链接</a>
			</td>
		</tr>
		<tr>
			<td colspan="5" class="form-body">
				<uc1:pager id="Pager1" runat="server" onselectedpageindexchanged="BindSelectedPageIndexChanged"
					pagesize="15" />
			</td>
		</tr>
	</table>
	<div style="display: none;">
		<asp:HiddenField ID="hid_ID" Value="" runat="server" />
		<asp:Button Text="删除" ID="btn_Delete" runat="server" OnClick="btn_Delete_Click" />
		<asp:Button Text="刷新" ID="btn_NewsRefresh" runat="server" OnClick="btn_NewsRefresh_Click" />
	</div>
</asp:Content>
